package com.springclouddemo.provider.controller;

import com.springclouddemo.demoapi.domain.Test;
import com.springclouddemo.provider.service.ProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collection;

@RestController
public class ProviderController {
    @Autowired
    private ProviderService service;

    @GetMapping("list")
    public Collection<Test> findAll(){

        return service.findall();
    }

}
